<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>getelement</title>
	<script type="text/javascript">
	window.onload=function(){
		var box=document.getElementById('box');
		   // alert(box.innerHTML);
		    //alert(box.innerText);
		 var box2=document.getElementById('box2');
		      box2.innerHTML=box.innerHTML;
		      box2.style.paddingLeft='20px';
		 var baidu=document.getElementById('baidu');
		     baidu.href='http://www.sina.com';
		      // for(var i in baidu){
		      // 	document.write(i);
		      // 	document.write('<br>');
		      // }
		      alert(baidu.class);
    //alert(baidu.className='123444');
            // baidu.setAttribute('className','6542');
            // baidu.setAttribute('class','6542');
             //alert(baidu.getAttribute('className'));
	}

	</script>
	<style type="text/css">
	#box{
		width:200px;
		height:200px;
		background:red url() 0 0 no-repeat;
	}
	#box2{
		width:200px;
		height:200px;
		background:orange url() 0 0 no-repeat;
	}
	</style>
</head>
<body>
<div id="box" onclick="alert('666666')">
<p>学并思</p><span>这是一个好的span</span>
</div>
<div id="box2">
</div>
<a href="http://www.baidu.com" id='baidu' class='sssss' xue="xue">百度</a>
	
</body>
</html>